package com.whq.mvc.base.redis;

import redis.clients.jedis.Jedis;

import java.util.Set;

public class JedisDemo {

    public static void main(String[] args) {
        Jedis jedis = RedisPool.getJedis();
        jedis.auth("123456");
        String value = jedis.get("redis_admin_token:220730159633620598784");
        System.out.println(value);

        Set<String> keys = jedis.keys("*");
        //keys.stream().forEach(x -> System.out.println(x));

        Long ttl = jedis.ttl("testSet");
        Long testSet = jedis.expire("testSet", 5);
        System.out.println(testSet);
    }
}
